<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <script src="https://cdn.jsdelivr.net/npm/vue@2.7.10/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <h2 v-show="isShow">我是一个h2</h2>
    <span v-show="isShow">我是一个span</span>
    <hr>
    <span v-if="isShow">我是一个span</span>
    <hr>
    <h1 v-if="row === 1">我是第一行</h1>
    <h2 v-else-if="row === 2">我是第二行</h2>
    <h3 v-else="row === 3">我是第三行</h3>
    <hr>
    <h1 v-pre>{{name}}</h1>
    <h1 v-text="name"></h1>
  </div>
  <script>
    let vm = new Vue({
      el: "#app",
      data() {
        return {
          name: "码路",
          isShow: false,
          row: 1
        }
      }
    });
  </script>

</body>

</html>